Skip to main content

mimeEncodeForMIMEHeader

Type

function

Summary

Encode data for MIME header

Syntax

mimeEncodeForMIMEHeader(<pData>,<pEncoding>)

Description

Use the mimeEncodeForMIMEHeader function to encode data for MIME headers

Parameters

NameTypeDescription

pData

The data to be encoded. If the parameter is not binary data then it will be encoded to binary as UTF-8 encoded text before encoding with the requested form.

pEncoding

The encoding to return the data in

  • "q": Q-encoding - similar to quoted-printable but used for header elements.
  • "b": Base 64 encoding

Examples

local tSubject
put "Attn René" into tSubject
put mimeEncodeForMIMEHeader(tSubject, "q") into tHeadersA["Subject"]

function: textEncode